package com.project.controller;

import com.project.util.UploadUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("upload")
public class UploadController {
    @RequestMapping("add")
    public String add(String name, @RequestParam("face")MultipartFile mf){

        String fileName = UploadUtil.upload(mf, "static/html/image");
        System.out.println(name+"    "+fileName);
        return "ok";
    }
}


